package com.daviteq.ems.utils;

/**
 * Entity of the cassandra configure
 * 
 * @author thanhthi.tran
 */
public class CassandraConfig {

    public final static String CLUSTER_NAME = "cassandra.clusterName";
    public final static String KEYSPACE = "cassandra.keyspace";
    public final static String NODE = "cassandra.node";
    public final static String PORT = "cassandra.port";
    public final static String CORE_CONN_PER_HOST = "cassandra.coreConnectionsPerHost";
    public final static String MAX_CONN_PER_HOST = "cassandra.maxConnectionPerHost";

    public final static String MAX_SIMUL_PER_HOST = "cassandra.maxSimultaneousRequestsPerConnectionThreshold";
    public final static String MIN_SIMUL_PER_HOST = "cassandra.minSimultaneousRequestsPerConnectionThreshold";
    public final static String KEEP_ALIVE = "cassandra.keepAlive";
    public final static String CONN_TIMEOUT = "cassandra.connectTimeoutMillis";
    public final static String READ_TIMEOUT = "cassandra.readTimeoutMillis";

    private String cluster;
    private String keyspace;
    private String node;
    private int port;
    private int coreConnectionsPerHost;
    private int maxConnectionPerHost;
    private int maxSimultaneousRequests;
    private int minSimultaneousRequests;

    private boolean keepAlive;
    private int connectTimeoutMillis;
    private int readTimeoutMillis;

    public String getCluster() {
        return cluster;
    }

    public void setCluster(String cluster) {
        this.cluster = cluster;
    }

    public String getKeyspace() {
        return keyspace;
    }

    public void setKeyspace(String keyspace) {
        this.keyspace = keyspace;
    }

    public String getNode() {
        return node;
    }

    public void setNode(String node) {
        this.node = node;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getCoreConnectionsPerHost() {
        return coreConnectionsPerHost;
    }

    public void setCoreConnectionsPerHost(int coreConnectionsPerHost) {
        this.coreConnectionsPerHost = coreConnectionsPerHost;
    }

    public int getMaxConnectionPerHost() {
        return maxConnectionPerHost;
    }

    public void setMaxConnectionPerHost(int maxConnectionPerHost) {
        this.maxConnectionPerHost = maxConnectionPerHost;
    }

    public int getMaxSimultaneousRequests() {
        return maxSimultaneousRequests;
    }

    public void setMaxSimultaneousRequests(int maxSimultaneousRequests) {
        this.maxSimultaneousRequests = maxSimultaneousRequests;
    }

    public int getMinSimultaneousRequests() {
        return minSimultaneousRequests;
    }

    public void setMinSimultaneousRequests(int minSimultaneousRequests) {
        this.minSimultaneousRequests = minSimultaneousRequests;
    }

    public boolean isKeepAlive() {
        return keepAlive;
    }

    public void setKeepAlive(boolean keepAlive) {
        this.keepAlive = keepAlive;
    }

    public int getConnectTimeoutMillis() {
        return connectTimeoutMillis;
    }

    public void setConnectTimeoutMillis(int connectTimeoutMillis) {
        this.connectTimeoutMillis = connectTimeoutMillis;
    }

    public int getReadTimeoutMillis() {
        return readTimeoutMillis;
    }

    public void setReadTimeoutMillis(int readTimeoutMillis) {
        this.readTimeoutMillis = readTimeoutMillis;
    }

}
